<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (isset($_GET["regId"]) && isset($_GET["message"]) && isset($_GET["id"])) {
    $regId = $_GET["regId"];
    $message = $_GET["message"];
    $id = $_GET["id"];
    
    include_once '../Model/GCM.php';
    
    $gcm = new GCM();

    $registatoin_ids = array($regId);
    $message = array("price" => $message);

    $result = $gcm->send_notification($registatoin_ids, $message);
    
    header("location:../used/client.php?id=$id");
    //echo $result;
}
?>
